<?php

//plugin for datepicker

function datepicker($value ='')
{
	global $headers;
	
	$headers[] = '
	        <script type="text/javascript" src="'. ROOT_URL .'includes/js/date-picker-v4/js/datepicker.js"></script>
        
        <link href="'. ROOT_URL .'includes/js/date-picker-v4/css/datepicker.css" rel="stylesheet" type="text/css" />
        
<script type="text/javascript">
// <![CDATA[     

// A quick test of the setGlobalVars method 
datePickerController.setGlobalVars({"split":["-dd","-mm"]});

// ]]>
</script>';

	return '<input type="text" class="dateformat-m-sl-d-sl-Y" id="date" name="date" value="' . $value . '" />';
}